<?php


namespace app\xcxapi\controller\v1;

use app\common\controller\XcxController;
use app\xcxapi\service\OverviewService;

class Overview extends XcxController
{
    /**
     * 招生总览
     * User: wufeng
     * Date: 2020/02/21.
     */
    public function recruitStudentsOverview()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->recruitStudentsOverview($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 招生近期详情
     * User: wufeng
     * Date: 2020/03/16.
     */
    public function recentDetailLists()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->recentDetailLists($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

	/**
	 * 招生总览详情
	 * User: wufeng
	 * Date: 2020/03/16
	 *
	 */
    public function overviewDetailLists()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->overviewDetailLists($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 来源、跟进状态、意向级别
     * User: wufeng
     * Date: 2020/03/16.
     */
    public function sourceFollowUpIntentionLevel()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->sourceFollowUpIntentionLevel($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 来源列表
     * User: wufeng
     * Date: 2020/03/16.
     */
    public function sourceLists()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->sourceLists($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 跟进状态列表
     * User: wufeng
     * Date: 2020/03/16.
     */
    public function followUpStatusLists()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->followUpStatusLists($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 意向级别列表
     * User: wufeng
     * Date: 2020/03/16.
     */
    public function intentionLevelLists()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->intentionLevelLists($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 收费总览
     * User: wufeng
     * Date: 2020/02/21.
     */
    public function chargeOverview()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->chargeOverview($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 课消总览
     * User: wufeng
     * Date: 2020/02/21.
     */
    public function classEliminationOverview()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->classEliminationOverview($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

	/**
	 * 近期/总览 详情列表
	 * User: wufeng
	 * Date: 2020/03/18
	 *
	 */
    public function classEliminationOverviewDetail()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->classEliminationOverviewDetail($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

    /**
     * 服务总览
     * User: wufeng
     * Date: 2020/02/21.
     */
    public function serviceOverview()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->serviceOverview($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

	/**
	 * 回访列表
	 * User: wufeng
	 * Date: 2020/03/17
	 *
	 */
    public function visitLists()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->visitLists($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }

	/**
	 * 投诉建议列表
	 * User: wufeng
	 * Date: 2020/03/17
	 *
	 */
    public function complaintSuggestionLists()
    {
        if ($this->request->isPost()) {
            $params = $this->request->param();
            $list = (new OverviewService($this->type))->complaintSuggestionLists($params);
            if (1 !== $list['code']) {
                $this->fail($list);
            }
            $this->win($list);
        }
        $this->fail('ILLEGAL_REQUEST');
    }
}
